﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace SerieSpotter
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            
            // /Serie/Homeland => Homeland is geen action maar een parameter 
            // dus moeten we een andere route maken boven de default route

          //  routes.MapRoute("Series",
           //     "series/{name}",
           //     new { Controller = "Series", action = "Search", name=UrlParameter.Optional });


            // /home/about
            // home = controller naam , action is about
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}